package cn.com.nes.site.entity.em.system;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;

/**
 * 字典类型枚举
 */
@Getter
public enum DictTypeEnum {

    UNIT_OF_MEASUREMENT("304", "计量单位"),
    ;

    private final String paramType;

    private final String typeName;

    DictTypeEnum(String paramType, String typeName) {
        this.paramType = paramType;
        this.typeName = typeName;
    }

    public static String getTypeName(String paramType) {
        if (StrUtil.isBlank(paramType)) {
            return StrUtil.EMPTY;
        }
        for (DictTypeEnum value : values()) {
            if (value.getParamType().equals(paramType)) {
                return value.getTypeName();
            }
        }
        return StrUtil.EMPTY;
    }
}
